package jwdt.xadmin.work.bean;

import jwdt.xadmin.system.bean.TUser;

import com.ezerg.db.Jdb;
import com.ezerg.db.annotation.Column;
import com.ezerg.db.annotation.Table;

@Table(name="t_tasklog", keys={"logid"}, comment="任务日志")
public class TTaskLog implements java.io.Serializable {

	private static final long serialVersionUID = 1L;

	@Column(value="logid", comment="ID")
	private Integer logid;
	
	@Column(value="taskid", comment="任务id")
	private Integer taskid;
	
	@Column(value="name", comment="名称")
	private String name;
	
	@Column(value="dt", comment="创建时间")
	private String dt;
	
	@Column(value="userid", comment="当前操作人")
	private Integer userid;
	
	@Column(value="fromuser", comment="上级操作人")
	private Integer fromuser;
	
	@Column(value="zt", comment="状态")
	private Integer zt;
	
	@Column(value="demo", comment="说明")
	private String demo;

	public Integer getLogid() {
		return logid;
	}

	public void setLogid(Integer logid) {
		this.logid = logid;
	}

	public Integer getTaskid() {
		return taskid;
	}

	public void setTaskid(Integer taskid) {
		this.taskid = taskid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDt() {
		return dt;
	}

	public void setDt(String dt) {
		this.dt = dt;
	}

	public Integer getUserid() {
		return userid;
	}

	public void setUserid(Integer userid) {
		this.userid = userid;
	}

	public Integer getZt() {
		return zt;
	}

	public void setZt(Integer zt) {
		this.zt = zt;
	}

	public Integer getFromuser() {
		return fromuser;
	}

	public void setFromuser(Integer fromuser) {
		this.fromuser = fromuser;
	}

	public String getDemo() {
		return demo;
	}

	public void setDemo(String demo) {
		this.demo = demo;
	}
	
	public String getUserName() {
		TUser user = (TUser) Jdb.get().get(TUser.class, this.userid);
		return user==null?"":user.getUsername();
	}
	public String getFromUserName() {
		TUser user = (TUser) Jdb.get().get(TUser.class, this.fromuser);
		return user==null?"":user.getUsername();
	}
	public String getTaskName() {
		TTask task = (TTask) Jdb.get().get(TTask.class, this.taskid);
		return task==null?"":task.getName();
	}
}
